<template>
  <div class="heard-box" :class="{ 'heard-box-center': props.center }">
    <div class="icon-box"></div>
    <p :style="{ color: props.color, fontFamily: store.styleInfo.fontFamily }">{{ props.title }}</p>
    <div class="icon-box"></div>
  </div>
</template>

<script setup lang="ts">
import { useProjectStore } from '@/store';

const store = useProjectStore();
const props = defineProps({
  title: {
    type: String,
  },
  center: {
    type: Boolean,
    default: true,
  },
  color: {
    type: String,
    default: '#000',
  },
});
</script>

<style lang="less" scoped>
.heard-box {
  width: 100%;
  display: flex;
  align-items: center;

  p {
    font-size: 34px;
    font-family: FZQINGKBYSS-B--GB1-0, FZQINGKBYSS-B--GB1;
    font-weight: normal;
    color: #333333;
    line-height: 52px;
    margin: 0 16px;
  }
}
.heard-box-center {
  justify-content: center;
}
.icon-box {
  width: 48px;
  height: 48px;
  background: #d8d8d8;
}
</style>
